import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/wareReturnBottleBox/addOrSave',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/wareReturnBottleBox/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/wareReturnBottleBox/addOrSave',
    method: 'post',
    data
  })
}
export function removeDetail(data) {
  return request({
    url: 'api/wareReturnBottleBox/removeDetail',
    method: 'post',
    data
  })
}

export function copy(data) {
  return request({
    url: 'api/wareReturnBottleBox/copy',
    method: 'post',
    data
  })
}

export function exportDe(data) {
  return request({
    url: 'api/wareReturnBottleBox/export',
    method: 'post',
    data
  })
}

export function importDe(data) {
  return request({
    url: 'api/wareReturnBottleBox/import',
    method: 'post',
    data
  })
}

export function passOrReject(data) {
  const obj = {
    url: 'api/wareReturnBottleBox/passOrReject',
    method: 'post',
    data
  }
  return request(obj)
}

export function enableOrDisable(data) {
  const obj = {
    url: 'api/wareReturnBottleBox/passOrReject',
    method: 'post',
    data
  }
  return request(obj)
}

export function print(data) {
  const obj = {
    url: 'api/wareReturnBottleBox/print',
    method: 'post',
    responseType: 'blob',
    data
  }
  return request(obj)
}

export function accept(data) {
  const obj = {
    url: '/api/wareReturnBottleBox/accept',
    method: 'post',
    data
  }
  return request(obj)
}

export function unAccept(data) {
  const obj = {
    url: '/api/wareReturnBottleBox/unAccept',
    method: 'post',
    data
  }
  return request(obj)
}


export default { add, edit, copy, exportDe, importDe, del, passOrReject, enableOrDisable, removeDetail, print, accept, unAccept }
